#include <stdio.h>
#include <time.h>
#include "comunicaciones.h"
#include <stdlib.h>

typedef enum{ false=0, true } bool;

void inicializar_tablero(char[8][8]);
bool tablero_lleno(char[8][8]);
char cambiar_turno(char);
void imprimir_tablero(char[8][8]);
unsigned int pedir_jugada(char[8][8], char turno);
unsigned int insertar_jugada(char[8][8], int, char);
bool comprobar_jugada(char[8][8],unsigned int, unsigned int);
bool comprobar_horizontal(char[8][8], unsigned int, unsigned int);
int comprobar_izquierda(char[8][8], unsigned int, unsigned int, int);
int comprobar_derecha(char[8][8], unsigned int, unsigned int, int);
bool comprobar_vertical(char[8][8], unsigned int, unsigned int);
bool comprobar_diagonal1(char[8][8], unsigned int, unsigned int);
bool comprobar_diagonal2(char[8][8], unsigned int, unsigned int);
bool comprobar_diagonal2_(char tablero[8][8],int x,int y,char jugador);
int comprobar_adyacentes(char tablero[8][8], unsigned int c,
						   unsigned int f, int dh, int dv );

unsigned int imprimir_menu();
void crear_ficheros_prueba(int n);
void partida_local();
void comenzar_partida_red();
void unirse_a_partida_red();
void crear_nombre_fichero(char[25]);
void guardar_en_fichero(char[25],unsigned int);

